package com.ssb.admin.modules.sys.permission.service;

import com.baomidou.mybatisplus.service.IService;
import com.ssb.admin.common.utils.TreeNode;
import com.ssb.admin.modules.sys.permission.entity.SysPermission;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author duaichao
 * @since 2018-08-23
 */
public interface ISysPermissionService extends IService<SysPermission> {
    /**
     * 查询角色的所有菜单
     * @param roleId  角色ID
     * @return List<TreeNode>
     */
    List<TreeNode> queryMenusByRoleId(Long roleId);

    /**
     * 查询所有菜单/按钮
     * @return List<TreeNode>
     */
    List<TreeNode> queryAllMenus();
    void save(SysPermission sysPermission);

}
